﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using XCore.Domain.Entities;

namespace SaaS.Model.Entity.Auths
{
    [Table("Auth_OrganizationUnits")]
    public class OrganizationUnit : IEntity<int>, IHasCreationTime
    {
        public int Id { get; set; }
        /// <summary>
        /// 上级ID
        /// </summary>
        public int? ParentId { get; set; }
        /// <summary>
        /// 代码
        /// </summary>
        [StringLength(16)]
        [Required]
        public string Code { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        [StringLength(32)]
        [Required]
        public string Name { get; set; }
        /// <summary>
        /// 描述
        /// </summary>
        [StringLength(128)]
        [Required]
        public string Description { get; set; }
        public DateTime CreationTime { get; set; }

    }
}
